<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="head.htm" />
</head>
<body>
	<jsp:include page="loggedIn.jsp" />
	<div id="head">
		<h1>Zeiterfassung</h1>
	</div>
	<jsp:include page="menu.jsp" />
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<c:choose>
			<c:when test="${status==0}">
				<!-- kommen -->
				<a href="Arbeitstag.html?action=kommen" class="button">Kommen</a>
			</c:when>
			<c:when test="${status==1}">
				<!-- working -->
				<a href="Arbeitstag.html?action=pause_start" class="button">Pause</a>
				<a href="Arbeitstag.html?action=gehen" class="button">Gehen</a>
				<c:choose>
					<c:when test="${projekt=='0'}">
						<p class="projekt">
						<form method="get" action="Arbeitstag.html" class="button">
							<table cellpadding="0" cellspacing="0">
								<tr>
									<td><input type="hidden" name="action" value="checkin" />
										<select name="projekt_id">
											<c:forEach items="${projekte}" var="projekte">
												<option value="${projekte.id}">${projekte.projekt_bez}</option>
											</c:forEach>
									</select></td>
								</tr>
								<tr>
									<td><input type="submit" value=" Einchecken " /></td>
								</tr>
							</table>
						</form>
						</p>
					</c:when>
					<c:otherwise>
						<p class="projekt">
							<c:out value="${projekt}" />
						</p>
						<p class="projekt">
							<a href="Arbeitstag.html?action=checkout" class="button">Auschecken</a>
						</p>
					</c:otherwise>
				</c:choose>
			</c:when>
			<c:when test="${status==2}">
				<!-- pause -->
				<a href="Arbeitstag.html?action=pause_end" class="button">Zurückmelden</a>
			</c:when>
			<c:when test="${status==3}">
				<!-- gegangen -->
				<a href="Arbeitstag.html?action=kommen2" class="button">Wiederkommen</a>
			</c:when>
		</c:choose>
	</div>
</body>
</html>
